<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class UpdateOrderAddIsJumpAndPayCode extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('order', function (Blueprint $table) {
            $table->string('pay_code', 50)->nullable()->comment('支付编码')->after('auto_erp');
            $table->unsignedTinyInteger('is_jump')->default(1)->comment('是否跳转到跨进申报系统小程序支付')->after('pay_code');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('order', function (Blueprint $table) {
            $table->dropColumn([
                'pay_code',
                'is_jump'
            ]);
        });
    }
}
